package cn.net.xyan.easy.spring.jpa.test.entity;

import javax.persistence.*;
import java.util.List;

/**
 * Created by xiashenpin on 16/1/21.
 */
@Entity
public class EntityB {
    String idB;
    List<EntityA> aList;
    String[] strings;
    Long[] longs;

    @Id
    public String getIdB() {
        return idB;
    }

    public void setIdB(String idB) {
        this.idB = idB;
    }

    @OneToMany(mappedBy = "entityB",cascade={CascadeType.PERSIST,CascadeType.MERGE,CascadeType.REMOVE})
    public List<EntityA> getaList() {
        return aList;
    }

    public void setaList(List<EntityA> aList) {
        this.aList = aList;
    }

    public String[] getStrings() {
        return strings;
    }

    public void setStrings(String[] strings) {
        this.strings = strings;
    }

    public Long[] getLongs() {
        return longs;
    }

    public void setLongs(Long[] longs) {
        this.longs = longs;
    }
}
